const readline = require('readline-sync');

// let timeObj = new Date(); //新创建的Date对象表示实例化时刻的日期和时间
// let year = timeObj.getFullYear();
// let month = timeObj.getMonth() + 1;
// let day = timeObj.getDate();

// let hour = timeObj.getHours();
// let minute = timeObj.getMinutes();
// let second = timeObj.getSeconds();
// console.log(`${year}-${month}-${day} ${hour}:${minute}:${second}`);

// let reg = /^[1][1-9]{10}$/;
// let str = '19828381439';
// console.log(reg.test(str));


//封装随机数（整数）
function random(min, max) {
    if (!max) {
        [max, min] = [min, 0];
    }
    let number = parseInt(Math.random(min, max) * (max - min + 1) + min);
    return number;
}
let s = new Set ();
while(s.size<50){
    s.add(random(50));
}
let newArr = [...s];
console.log(newArr);



